Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backtester: Fix ensureOrderFitsWithinHLV #1338

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

yangrq1018
Copy link
Contributor

PR Description

Compare volume directly as the current implementation passes candle volume in base currency.

Fixes # (issue)

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • [x ] Bug fix (non-breaking change which fixes an issue)

How has this been tested

I updated the relavant test.

Checklist

  • [x ] My code follows the style guidelines of this project
  • [x ] I have performed a self-review of my own code
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • [x ] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • [x ] My changes generate no new warnings
  • [x ] I have added tests that prove my fix is effective or that my feature works
  • [x ] New and existing unit tests pass locally and on Github Actions/AppVeyor with my changes
  • [x ] Any dependent changes have been merged and published in downstream modules

@shazbert shazbert requested a review from a team September 11, 2023 00:30
@shazbert shazbert added the review me This pull request is ready for review label Sep 11, 2023
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 🚀 Thanks.

This branch:

image

Master:

image

Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK! Thanks for your pickup and contribution yangrq1018. Some exchanges still use quotevolume for their volume fields in candles (and also in tickers, but that's unrelated here). However, going over each exchange shows that the majority appropriately set the fields and so your solution is a good improvement!

@thrasher- thrasher- changed the title fix: ensureOrderFitsWithinHLV backtester: Fix ensureOrderFitsWithinHLV Sep 11, 2023
@thrasher- thrasher- merged commit bc26c53 into thrasher-corp:master Sep 11, 2023
shazbert pushed a commit to shazbert/gocryptotrader that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants